home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
comms
/
html-heaven
/
arexx
/
html-skoed.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-01-08
|
2KB
|
60 lines
/* HTML-Helper Arexx script for SkoEd
* Ver : 1.1 (7th January 1996)
* Author : paul Kolenbrander (paul@serena.iaehv.nl)
* Function : Pass on the HTML commands from HTML-Helper to SkoEd.
* Input : HTMLCMD - The HTML command to be inserted.
*/
OPTIONS RESULTS /* enable return codes */
OPTIONS FAILAT 11 /* Needed for block detect */
PARSE ARG MYCMD HTMLCMD
HTMLCMD = SUBSTR(HTMLCMD,2, LENGTH(HTMLCMD)-1) /* strip leading space */
ADDRESS 'SKOED1' /* Default, edit if needed */
HTMLCMD = SUBSTR(HTMLCMD,2, LENGTH(HTMLCMD)-2) /* strip leading/trailing "*/
IF POS('><',HTMLCMD) ~= 0 THEN DO /* Is it a split command? */
/* If yes, then.... */
"Mark"
"EndOfBlock"
IF RC = 0 THEN DO /* error means no block */
CMD2 = right(HTMLCMD,(LENGTH(HTMLCMD)-(LASTPOS('<',HTMLCMD))+1))
CMD1 = substr(HTMLCMD,1,(LENGTH(HTMLCMD)-LENGTH(CMD2)))
"EndOfBlock"
"String("||CMD2||")" /* Insert at block end */
"StartOfBlock"
"String("||CMD1||")" /* Insert at block begin */
"Block_Hide" /* And clean up */
"Goto_Mark"
"UnMark"
END
else DO
"Goto_Mark"
"String("||HTMLCMD||")" /* Insert at current pos */
"UnMark"
END
END
else
"String("||HTMLCMD||")" /* Insert at current pos */
IF MYCMD = 'SAVE' THEN DO
"Save_File"
"Get_Var(FileName)"
bestand = Result
"Get_Var(FilePath)"
pad = Result
pad = pad||bestand
say pad
IF RESULT = -1 THEN DO
ADDRESS COMMAND 'rx S:HTMLVIEW.rexx'
END
ELSE DO
ADDRESS COMMAND 'rx S:HTMLVIEW.rexx '||pad
END
END
EXIT /* And exit the script. */